package com.atguigui.leetcode;

/**
 * 1037.有效的回旋镖
 * Project: leetcode
 * Package: com.atguigui.leetcode
 * Version: 1.0
 * <p>
 * Created by WJX on 2022/6/8 9:39
 */
public class P1037ValidBoomerang {
    public static void main(String[] args) {
        Solution solution = new P1037ValidBoomerang().new Solution();
        // TO TEST
    }

    //leetcode submit region begin(Prohibit modification and deletion)
    class Solution {
        public boolean isBoomerang(int[][] points) {
            int x1 = points[2][1] - points[0][1];
            int y1 = points[1][0] - points[0][0];

            int x2 = points[1][1] - points[0][1];
            int y2 = points[2][0] - points[0][0];

            return (x1 * y1) - (x2 * y2) != 0;
        }
    }
}
